<%@page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@include file="/includes/taglibs.jsp"%>
<%@page import="com.feib.soeasy.util.UserUtil"%>
<%@page import="com.feib.soeasy.action.Soez9006ActionBean"%>
<%@page import="com.feib.soeasy.model.UserActionLog"%>

<%
	Soez9006ActionBean actionBean =(Soez9006ActionBean) request.getAttribute("actionBean");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><%=UserUtil.getCurrentMenuItemName() %></title>
	<script type="text/javascript" src="<c:url value='/scripts/jquery/jquery.bgiframe-2.1.2.js'/>"></script>
	
	<script type="text/javascript"><!--
		
	$(document).ready(function() {
		
		
		
		$('#doQueryBtn').click(function() {
			var errMsg = "";
			var groupNo = $('#qryUserActionLog\\.groupNo').val();
			
			if (null == groupNo || 0 == groupNo.length){
				errMsg = errMsg + "業者代號是必要欄位<br/>";
			}//2011/06/16 jeff Gu  start   修正    業者代號不存在時 查詢錯誤問題
			else if (12 != groupNo.length){
				errMsg = errMsg + "業者代號 為固定長度12碼<br/>";
			}
			//2011/06/16 jeff Gu  end   修正    業者代號不存在時 查詢錯誤問題
			if (0 != errMsg.length){
				$("#ajaxErrorMessageDiv").html(errMsg);
				$("#ajaxErrorMessageDiv" ).dialog( "destroy" );
				$("#ajaxErrorMessageDiv" ).dialog({  
					title:'請修正下列錯誤' 
					,width: 300
					, resizable: false
					, modal: true
					, buttons: {
						Ok: function() {
							$( this ).dialog( "close" );
						}
					}
				});
				return false;
			}
			
			
			     $('#doQueryBtn2').click();
					
			
		
		});
												
		
		$("#findMenuItemPkImg").click(function() {
			//$("#menuItemCheckListDiv" ).dialog( "destroy" );
			$("#menuItemCheckListDiv" ).dialog({  
				title:'功能選項' 
				, width: 600
				, resizable: true
				, modal: true
				, close: function(event, ui) {  
					var menuList = '';
										
					for (i=1; i<=5; i=i+1)
				{
				     var a='menuItemCheckListDiv input:checkbox.chk';
				     a+=i;
				     $('#'+a).each(function(){               
			            				           
						if ( $(this).attr('checked') ){
			            	menuList = menuList +  $(this).val() + ',';
			            }																								
						
			        });
				}
					$('#qryActionBeans').val(menuList);
				}
			});
		});
	

		$("[id^='menuItem']").click(function() {
			var menuItemPk = this.id.substring(8);
			checkParent(menuItemPk);
			
		});
		
		function   checkParent(menuItemPk)
	{	
			
	    var parentMenuItem='menuItemCheckListDiv input:checkbox.chk';
	    parentMenuItem+=menuItemPk;
	    var menuItem='menuItem';
	    menuItem+=menuItemPk;
	    
	    if($('#'+menuItem).attr('checked')) 
	     {
	 
	  	   
				$('#'+parentMenuItem).each(function()
				{ 				
				   $(this).attr('checked', true);
					
		        });		

	      } else{
	  
	        	 $('#'+parentMenuItem).each(function()
				  { 				
					$(this).attr('checked', false);
								
			      });		

	            }
	 		   
	    
	    
	}	
		
		   
				
		
		$("#allMenuCheckedBtn").click(function() 
		{
			
			for (i=1; i<=5; i=i+1)
			{
		     var a='menuItemCheckListDiv input:checkbox.chk';
		     a+=i;
			$('#'+a).each(function()
			{ 
				
				$(this).attr('checked', true);
	        });
			}
		});
		
		$("#clearMenuCheckedBtn").click(function() {
			for (i=1; i<=5; i=i+1)
			{
		     var a='menuItemCheckListDiv input:checkbox.chk';
		     a+=i;
			$('#'+a).each(function()
			{ 
				
				$(this).attr('checked', false);
	        });
			};
		});
		
		$("#closeMenuDialogBtn").click(function() {
			$("#menuItemCheckListDiv" ).dialog( "close" );
		});
		
		
		var dates = $( "#qryInDateFrom, #qryInDateTo" ).datepicker({
			defaultDate: "-1m",
			changeMonth: true,
			changeYear: true,
			numberOfMonths: 1,
			dateFormat: 'yy/mm/dd',
			showButtonPanel: true,
			showOn: "both",
			buttonImage: "<c:url value='styles/default/images/calendar.gif'/>",
			buttonImageOnly: true,
			onSelect: function( selectedDate ) {
				var option = this.id == "qryInDateFrom" ? "minDate" : "maxDate",
					instance = $( this ).data( "datepicker" );
					date = $.datepicker.parseDate(
						instance.settings.dateFormat ||
						$.datepicker._defaults.dateFormat,
						selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
			}
		}
		   );
		
<%if ( UserUtil.isBankGroup()){ %>
		$('#findGroupNoImg').click(function() {
			var groupNo = $('#qryUserActionLog\\.groupNo').val();
			
			if (null != groupNo && 0 != groupNo.length){
				var tmpGroupNo = parseInt(groupNo,10);
				if(! isNaN(tmpGroupNo)){
					$('#hidden\\.qryGroup\\.groupNo').val(groupNo);
					$('#hidden\\.qryGroup\\.groupName').val('');
					$('#qryGroup\\.groupNo').val(groupNo);
					$('#qryGroup\\.groupName').val('');
				}
				else{
					$('#hidden\\.qryGroup\\.groupNo').val('');
					$('#hidden\\.qryGroup\\.groupName').val(groupNo);
					$('#qryGroup\\.groupNo').val('');
					$('#qryGroup\\.groupName').val(groupNo);
					$("#queryGroupResultDiv").html('');
				}
				
				$("#findGroupDiv" ).dialog({  
					title:'帳單業者查詢' 
					, width: 600
					, resizable: true
					, modal: true
				});
				
				$('#doAjaxQueryGroupsBtn').click();
			}
			else{
				$('#hidden\\.qryGroup\\.groupNo').val('');
				$('#hidden\\.qryGroup\\.groupName').val('');
				$('#qryGroup\\.groupNo').val('');
				$('#qryGroup\\.groupName').val('');
				$("#queryGroupResultDiv").html('');
				$("#findGroupDiv" ).dialog({  
					title:'帳單業者查詢' 
					, width: 600
					, resizable: true
					, modal: true
				});
			}
		});
		
		$('#doAjaxQueryGroupsBtn').click(function() {
			var groupNo = $('#qryGroup\\.groupNo').val();
			var groupName = $('#qryGroup\\.groupName').val();
			$("#queryGroupResultDiv").html('');

			$('#hidden\\.qryGroup\\.groupNo').val(groupNo);
			$('#hidden\\.qryGroup\\.groupName').val(groupName);
			doQueryGroupAction(1);
			
		});
		
		$('#doAjaxCloseGroupsBtn').click(function() {
			$("#findGroupDiv" ).dialog( "destroy" );
		});
		
<%}%>		
	});
	
	function doQueryAction(pageNumber)
	{
		$("#hidden\\.queryResult\\.pageNumber").val(pageNumber);
		$("#qryUserActionLogForm2").submit();
	}
	
	function doQueryGroupAction(pageNumber)
	{
		$('#hidden\\.queryGroupResult\\.pageNumber').val(pageNumber);
		$("#queryGroupResultDiv").fadeTo("slow", 0.1);

		waitingDialog({});
		$.ajax({url : "<c:url value='/ajax/Soez9006.action'/>",
			async : true,
			type : 'POST',
			data : $("#queryGroupHiddenFrom").serialize(),
			dataType : 'html',
			success : function(data, textStatus, XMLHttpRequest){
					$("#queryGroupResultDiv").html(data);
				},
			error : function(XMLHttpRequest, textStatus, errorThrown){
				$("#ajaxErrorMessageDiv").html('系統發生錯誤，請聯絡管理員');
				$("#ajaxErrorMessageDiv" ).dialog( "destroy" );
				$("#ajaxErrorMessageDiv" ).dialog({  
					title:'系統錯誤' 
					,width: 600
					, resizable: false
					, modal: true
					, buttons: {
						Ok: function() {
							$( this ).dialog( "close" );
						}
					}
				});
				},
			complete: function(XMLHttpRequest, textStatus){
				if ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent)){
					$("#findGroupDiv" ).dialog( "close" );
					$("#findGroupDiv" ).dialog( "open" );					
				}
				closeWaitingDialog();
				$("#queryGroupResultDiv").fadeTo("slow", 1);
			}
		});
	}
	
	//
	--></script>
</head>
<body>
<div id="mainAreaCT">
		<jsp:include page="/includes/path.jsp"/>
		<jsp:include page="/includes/subMenu.jsp"/>
		
	<div id="uploadFileFormDiv">
		<stripes:form id="qryUserActionLogForm" beanclass="com.feib.soeasy.action.Soez9006ActionBean" method="post" onsubmit="javascript: waitingDialog({});">
				
		<table id="queryForm">
			<%if ( UserUtil.isBankGroup()){ %>
			<tr>
				<th>業者代號<span id="mustKeyInStar">**</span></th>
				<td>
					<div id="findGroupNoImg"><a href="javascript: void(0)" class="btnZoom">查詢</a></div>
					<stripes:text id="qryUserActionLog.groupNo" name="qryUserActionLog.groupNo" size="12" maxlength="12" />
					<stripes:hidden id="qryUserActionLog.groupName" name="qryUserActionLog.groupName"  />
					<span id="qryFormatDefinition.group.groupName.span"><c:out value="${actionBean.qryUserActionLog.groupName }"/></span>					
				</td>
			</tr>
			<%} else {%>
			<stripes:hidden id="qryUserActionLog.groupNo" name="qryUserActionLog.groupNo" />
			<%} %>
			<tr>
				<th>交易日期<span id="mustKeyInStar">**</span></th>
				<td>
					<stripes:text id="qryInDateFrom" name="qryInDateFrom" size="10" maxlength="10" formatPattern="yyyy/MM/dd" readonly="true"/>
					<stripes:select id="qryInDateHourFrom" name="qryInDateHourFrom">
						<stripes:option value="0" label="00"/>
						<stripes:option value="1" label="01"/>
						<stripes:option value="2" label="02"/>
						<stripes:option value="3" label="03"/>
						<stripes:option value="4" label="04"/>
						<stripes:option value="5" label="05"/>
						<stripes:option value="6" label="06"/>
						<stripes:option value="7" label="07"/>
						<stripes:option value="8" label="08"/>
						<stripes:option value="9" label="09"/>
						<stripes:option value="10" label="10"/>
						<stripes:option value="11" label="11"/>
						<stripes:option value="12" label="12"/>
						<stripes:option value="13" label="13"/>
						<stripes:option value="14" label="14"/>
						<stripes:option value="15" label="15"/>
						<stripes:option value="16" label="16"/>
						<stripes:option value="17" label="17"/>
						<stripes:option value="18" label="18"/>
						<stripes:option value="19" label="19"/>
						<stripes:option value="20" label="20"/>
						<stripes:option value="21" label="21"/>
						<stripes:option value="22" label="22"/>
						<stripes:option value="23" label="23"/>						
						<stripes:option value="24" label="24"/>
					</stripes:select>
					～
					<stripes:text id="qryInDateTo" name="qryInDateTo" size="10" maxlength="10" formatPattern="yyyy/MM/dd" readonly="true"/>
					<stripes:select id="qryInDateHourTo" name="qryInDateHourTo">
						<stripes:option value="0" label="00"/>
						<stripes:option value="1" label="01"/>
						<stripes:option value="2" label="02"/>
						<stripes:option value="3" label="03"/>
						<stripes:option value="4" label="04"/>
						<stripes:option value="5" label="05"/>
						<stripes:option value="6" label="06"/>
						<stripes:option value="7" label="07"/>
						<stripes:option value="8" label="08"/>
						<stripes:option value="9" label="09"/>
						<stripes:option value="10" label="10"/>
						<stripes:option value="11" label="11"/>
						<stripes:option value="12" label="12"/>
						<stripes:option value="13" label="13"/>
						<stripes:option value="14" label="14"/>
						<stripes:option value="15" label="15"/>
						<stripes:option value="16" label="16"/>
						<stripes:option value="17" label="17"/>
						<stripes:option value="18" label="18"/>
						<stripes:option value="19" label="19"/>
						<stripes:option value="20" label="20"/>
						<stripes:option value="21" label="21"/>
						<stripes:option value="22" label="22"/>
						<stripes:option value="23" label="23"/>						
						<stripes:option value="24" label="24"/>
					</stripes:select>
				</td>
			</tr>
			<tr>
				<th>使用者代號</th>
				<td>
					<stripes:text name="qryUserActionLog.userId" id="qryUserActionLog.userId" size="10" maxlength="10"/>
				</td>
			</tr>
			<tr>
				<th>功能名稱</th>
				<td>
					<div id="findMenuItemPkImg"><a href="javascript: void(0)" class="btnZoom">查詢</a></div>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="queryFunction">
					<stripes:hidden id="qryActionBeans" name="qryActionBeans"/>
					<stripes:button  id="doQueryBtn" name="doQuery" value="查詢" class="formBtn" />
				    <stripes:submit  style="display:none" id="doQueryBtn2" name="doQuery"  />
				
				</td>
			</tr>
		</table>
		</stripes:form>
	</div><!-- end #uploadFileFormDiv -->
	
	<c:choose>
		<c:when test="${null != actionBean.queryResult && not empty actionBean.queryResult.paginatedList}">
		<stripes:form id="qryUserActionLogForm2" beanclass="com.feib.soeasy.action.Soez9006ActionBean" method="post" onsubmit="javascript: waitingDialog({});">
			<stripes:hidden id="hidden.qryUserActionLog.groupNo" name="qryUserActionLog.groupNo"/>
			<stripes:hidden id="hidden.qryInDateFrom" name="qryInDateFrom" formatPattern="yyyy/MM/dd"/>
			<stripes:hidden id="hidden.qryInDateHourFrom" name="qryInDateHourFrom" />
			<stripes:hidden id="hidden.qryInDateTo" name="qryInDateTo" formatPattern="yyyy/MM/dd"/>
			<stripes:hidden id="hidden.qryInDateHourTo" name="qryInDateHourTo" />
			<stripes:hidden id="hidden.qryUserActionLog.userId" name="qryUserActionLog.userId" />
			<stripes:hidden id="hidden.qryActionBeans" name="qryActionBeans"/>
						
			<stripes:hidden id="hidden.queryResult.pageNumber" name="queryResult.pageNumber" />			
			<input type="hidden" id="method2" name="doQuery"/>
		
		<c:set var="lastPageNumber" value="${actionBean.queryResult.totalPageCount}"/>
		<c:set var="currentPageNumber" value="${actionBean.queryResult.pageNumber}"/>
		<c:set var="prePageNumber" value="${actionBean.queryResult.pageNumber - 1}"/>
		<c:set var="nextPageNumber" value="${actionBean.queryResult.pageNumber + 1}"/>
		
		<div id="paginationBar">
			<input type="button" id="firstPageBtn" value="第一頁" <c:out value='${prePageNumber<=0 ? "disabled": "" }'/> />
			<input type="button" id="prePageBtn" value="上一頁" <c:out value='${prePageNumber<=0 ? "disabled": "" }'/> />
			第 <input type="text" id="currentPageText" value="${currentPageNumber }" size="3" maxlength="4"> / ${lastPageNumber} 頁
			<input type="button" id="nextPageBtn" value="下一頁" <c:out value='${lastPageNumber<nextPageNumber ? "disabled": "" }'/> />
			<input type="button" id="lastPageBtn" value="最末頁" <c:out value='${lastPageNumber<=currentPageNumber ? "disabled": "" }'/> />
		</div>
		
		<table id="listTable">
		<thead>
			<tr>
				<th>交易日期</th>
				<th>時間</th>
				<%if ( UserUtil.isBankGroup()){ %>
				<th>業者名稱</th>
				<%} %>
				<th>功能模組</th>
				<th>功能名稱</th>
				<th>操作內容</th>
				<th>操作結果</th>
				<th>來源IP</th>
				<th>使用者帳號</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${actionBean.queryResult.paginatedList}" var="viewObj" varStatus="rowstat">
			<tr>
				<td align="center"><fmt:formatDate value="${viewObj.inDateTime}" pattern="yyyy/MM/dd" /></td>
				<td align="center"><fmt:formatDate value="${viewObj.inDateTime}" pattern="HH:mm:ss" /></td>
				<%if ( UserUtil.isBankGroup()){ %>
				<td><c:out value="${viewObj.groupName}"/></td>
				<%} %>
				<td><c:out value="${viewObj.parentActionName}"/></td>
				<td><c:out value="${viewObj.actionName}"/></td>
				<td>
				<%
				UserActionLog userActionLog = (UserActionLog)pageContext.getAttribute("viewObj");
				if ("doDefault".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("進功能頁");
				else if ("login".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("系統登入");
				else if ("logout".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("系統登出");
				else if ("doQuery".equalsIgnoreCase(userActionLog.getEventName()) || "doAjaxQuery".equalsIgnoreCase(userActionLog.getEventName())
				                || "doAjaxQueryAction".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("查詢");
				else if ("doSave".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("確認");
				else if ("doAjaxQueryGroups".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("業者查詢");				
				else if ("doDownloadPaymentAction".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("下載繳費單");
				else if ("doAjaxQueryFilePayments".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("查詢繳費單內容");
				else if ("doUpload".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("上傳");
				else if ("doPaymentsCanceledAction".equalsIgnoreCase(userActionLog.getEventName()))
				    out.print("註銷繳費單");
				else if ("toAjaxEditUser".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("查詢使用者內容");
				else if ("doAjaxModifyRoleAction".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("確認");
				else if ("doAjaxUserInfoDisabledAction".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("強迫登出");
				else if ("doAjaxDownloadExcelFile".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("下載EXCEL");				   
			    else if ("doDownloadUploadFileAction".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					out.print("帳單明細下載");
			    else if ("doAjaxQueryPayments".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("帳單明細查詢");
				else if ("doAjaxBatchUploadFileConfirm".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					out.print("批次確認帳單審核");
				else if ("doUploadFileDeleteAction".equalsIgnoreCase(userActionLog.getEventName())) //soez3003
					out.print("批次確認帳單刪除");	
				else if ("doDownloadUploadFileForCsv".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("下載csv");	
			    else if ("doWriteOffPaymentsAction".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					out.print("帳單內容查詢");
			    else if ("doDownloadAction".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("下載");
				else if ("doChangePwd".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					    out.print("修改密碼");				
				else if ("doAjaxQueryFeedbackLog".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("查詢異常狀態明細資料");
				else if ("doAjaxPaymentsConfirm".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					out.print("帳單核銷放行");
				else if ("toAjaxWriteoffPayment".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					out.print("帳單內容查詢");
				else if ("doAjaxQueryPayment".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
				    out.print("帳單明細查詢");
				else if ("doNoticeEmail".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					out.print("發送mail");
				else if ("doAjaxQueryFileErrorReasons".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					out.print("查詢轉入錯誤原因");
				else if ("doAjaxGroupNoChange".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
					out.print("業者代號改變");	    
				else if ("doReloadRolesOptions".equalsIgnoreCase(userActionLog.getEventName())) //soez9002
						out.print("角色維護選項");
				else
				    out.print(userActionLog.getEventName());
				
				%>
				</td>
				<td><c:out value="${viewObj.logNote}"/></td>
				<td><c:out value="${viewObj.remoteAddr}"/></td>
				<td><c:out value="${viewObj.userId}"/></td>					
			</tr>
			</c:forEach>
		</tbody>
		</table>
	
		</stripes:form>
	
		
		<script type="text/javascript">
		<!--
		$(document).ready(function() {
			
			$('#printBtn2').click(function() {
				//window.print();
				//doQueryPrintAction();
				divPrint('uploadFileFormDiv');//只印目前這筆
			});
			
			
			$("[id^='firstPageBtn']").click(function() {
				doQueryAction(1);
			});
			
			$("[id^='prePageBtn']").click(function() {
				doQueryAction(<c:out value='${prePageNumber}'/>);
			});
			
			$("[id^='nextPageBtn']").click(function() {
				doQueryAction(<c:out value='${nextPageNumber}'/>);
			});
			
			$("[id^='lastPageBtn']").click(function() {
				doQueryAction(<c:out value='${lastPageNumber}'/>);
			});
			
			$("[id^='currentPageText']").change(function() {
				var value = this.value;
				if (value != ''){
					value = value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
					var intRegex = /^\d+$/;
					if(!intRegex.test(value)) {
						alert('頁數必須是整數');
						return ;
					}
					
					value = parseInt(value, 10);
					
					if (value < 1){
						alert('頁數必須是大於1');
						return ;
					}
					else if (value > <c:out value='${lastPageNumber}'/>){
						alert('頁數必須是小於總頁數 (<c:out value='${lastPageNumber}'/>)');
						return ;
					}
					else if (value != <c:out value='${currentPageNumber}'/>){
						doQueryAction(value);
					}
					
				}
				else{
					alert('頁數不可為空白');
					return ;
				}
			});
		});
		//-->
		</script>
		
		</c:when>
		<c:when test="${null != actionBean.queryResult && empty actionBean.queryResult.paginatedList}">	
				<div id="queryNothingBlockDiv1" style="display: none;">
					查無資料
				</div>		
				<script type="text/javascript">
				<!--
				$(document).ready(function() {
					$( "#queryNothingBlockDiv1" ).dialog({  title:'<%=UserUtil.getCurrentMenuItemName() %>' ,width: 300, resizable: false, modal: true, buttons : {
						Ok : function() {
							$(this).dialog("close");
						}
					}  });
				});
				//-->
				</script>
		</c:when>
	</c:choose>

	<%if ( UserUtil.isBankGroup()){ %>
	<!-- 業者代號 查詢 -->
	<div id="findGroupDiv" style="display: none;">
		<div id="queryGroupDiv">
		<table>
			<tr>
				<th>業者代號</th>
				<td><input id="qryGroup.groupNo" type="text" size="12" maxlength="12" /> </td>
			</tr>
			<tr>
				<th>名稱</th>
				<td><input id="qryGroup.groupName" type="text" size="20" /></td>
			</tr>
			<tr>
				<td colspan="2" class="queryFunction">
					<input type="button" value="查詢" id="doAjaxQueryGroupsBtn"/>
					<input type="button" value="離開" id="doAjaxCloseGroupsBtn"/>
				</td>
			</tr>
		</table>
		</div>
		<div id="queryGroupResultDiv" style="display: none;">
		</div>
	</div>
	<div id="queryGroupHiddenFormDiv" style="display: none; ">
		<stripes:form id="queryGroupHiddenFrom" beanclass="com.feib.soeasy.action.Soez9006ActionBean" 
			method="post" onsubmit="javascript: return false;">
			<stripes:hidden id="hidden.qryGroup.groupName" name="qryGroup.groupName"/>
			<stripes:hidden id="hidden.qryGroup.groupNo" name="qryGroup.groupNo"/>
			<stripes:hidden id="hidden.queryGroupResult.pageNumber" name="queryGroupResult.pageNumber" />			
			<input type="hidden" id="method" name="doAjaxQueryGroups"/>
		</stripes:form>
	</div>
	<%} %>
	
	
	<div id="menuItemCheckListDiv" style="display: none;">
	<table>
		<c:set var="checkIndex" value="${0}"/>
		<c:forEach items="${actionBean.menuItems}" var="viewObj" varStatus="rowstat">
	            	<tr>
	            		<th>
	            			<input name="checkMenuItem[${rowstat.index}].menuItemPk" type="checkbox" id="menuItem${viewObj.key.menuItemPk}" value="<c:out value='${viewObj.key.actionBean}'/>" <c:if test="${viewObj.key.checked }">checked="checked"</c:if> class="chk${viewObj.key.menuItemPk}" />	            		
	            			<c:out value="${viewObj.key.actionName}"/>
	            		</th>
	            	</tr>
	            	<tr>
	            		<td>
	            			<c:set var="cnt" value="${1}"/>
	            			<c:forEach items="${viewObj.value}" var="subViewObj" varStatus="subRowstat">
	            				<c:if test="${cnt > 4}"> <c:set var="cnt" value="${1}"/><br/></c:if>
	            				<c:if test="${cnt == 1}">&nbsp;&nbsp;&nbsp;</c:if>
	            					&nbsp;<input name="checkMenuItems[${checkIndex}]" type="checkbox" id="parentMenuItem${subViewObj.parentMenuItem.menuItemPk}" value="<c:out value='${subViewObj.actionBean}'/>" <c:if test="${subViewObj.checked }">checked="checked"</c:if> class="chk${subViewObj.parentMenuItem.menuItemPk}"/>
            						<c:out value="${subViewObj.actionName}"/>
            						<c:set var="cnt" value="${cnt + 1}"/>
            						<c:set var="checkIndex" value="${checkIndex + 1}"/>
            				</c:forEach>
	            		</td>
	            	</tr>
		</c:forEach>
		<tr>
			<td align="center">
				<input type="button" id="allMenuCheckedBtn" value="全選"/>
				<input type="button" id="clearMenuCheckedBtn" value="全不選"/>
				<input type="button" id="closeMenuDialogBtn" value="離開"/>
				
			</td>
		</tr>
	</table>
	</div>
		
	<!-- Message -->
	<div id="ajaxErrorMessageDiv" style="display: none;"></div>
	
</div>
</body>
</html>